package com.blacksheep.mtm.controller;


import com.blacksheep.mtm.common.utils.ResultUtil;
import com.blacksheep.mtm.dao.TbOrderFinishMapper;
import com.blacksheep.mtm.pojo.common.DataTablesResult;
import com.blacksheep.mtm.pojo.common.Result;
import com.blacksheep.mtm.pojo.manager.TbOrder;
import com.blacksheep.mtm.pojo.manager.TbOrderFinish;
import com.blacksheep.mtm.service.BounsService;
import com.blacksheep.mtm.service.OrderFinishService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/order")
public class OrderFinishController {

    @Autowired
    private OrderFinishService orderFinishService;

    @RequestMapping(value = "/finish/id",method = RequestMethod.GET)
    @ApiOperation(value = "通过id获取收货订单")
    public Result<TbOrderFinish>  getFinishOrderByOrderId(String orderId){
        TbOrderFinish result = orderFinishService.getOneByOrderId(orderId);
        return new ResultUtil<TbOrderFinish>().setData(result);
    }


    //抽奖剩余次数

}
